package com.xdjd.task.mapper.activity;

import com.xdjd.task.model.activity.ActivityChallengeRecordPo;
import net.oschina.durcframework.easymybatis.dao.CrudDao;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

public interface ActivityChallengeRecordPoDao extends CrudDao<ActivityChallengeRecordPo> {
    @Update("update activity_challenge_record set step_number=#{stepNumber} where member_id=#{memberId} and record_date=CURDATE()")
    int updateTodayStepByMemberId(@Param("memberId") Long memberId, @Param("stepNumber") Long stepNumber);

    @Update("update activity_challenge_record set complete_status=1 where complete_status=0 and record_date=CURDATE()")
    int settleChallenge();
}